package Demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-18
 * Time: 15:34
 */
public class Test {
    public static void main(String[] args) {
        Test t = new Test();
        Triangle triangle = new Triangle();
        Rotundity  rotundity = new Rotundity();
        Square square = new Square();
        Flower flower = new Flower();

        Shapes[] shape = new Shapes[]{triangle,rotundity,square,flower};
        for (Shapes s:shape) {
            s.draw();
        }
    }
    public void drawMap(Shapes shape){
        shape.draw();
    }
    public static void main1(String[] args) {
        Test t = new Test();
        Triangle triangle = new Triangle();
        Rotundity  rotundity = new Rotundity();
        Square square = new Square();
        Flower flower = new Flower();

        t.drawMap(triangle);
        t.drawMap(rotundity);
        t.drawMap(square);
        t.drawMap(flower);

    }
}
